//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_squadmgmtlblostfocus.sqf"
#include "x_setup.sqf"

#include "x_uiinc.sqf"

private ["_butidc", "_carray", "_ctrl", "_sel", "_disp", "_buctrl"];
PARAMS_2(_butidc,_carray);
_ctrl = _carray select 0;
_sel = lbCurSel _ctrl;
if (_sel != -1) then {
	_ctrl lbSetCurSel -1;
};
disableSerialization;
_disp = __uiGetVar(X_SQUADMANAGEMENT_DIALOG);
_butidc = _butidc + 1000;
_buctrl = CTRL(_butidc);
if (ctrlText _buctrl == "Remove") then {
	_buctrl ctrlSetText "Leave";
};